#ifndef WORDITEM_H
#define WORDITEM_H

#include <QString>
#define num(text) QString::number(text)

class WordItem
{
public:
	WordItem(WordItem *parent);
	WordItem(QString word, QString translate, QString transcription, unsigned pluses = 0, unsigned minuses = 0, unsigned known = 0);
	inline QString word(void) { return m_word; }
	inline QString translate(void) { return m_translate; }
	inline QString transcription(void) { return m_transcription; }
	inline QString toString(void) { return m_word + "\t\t" + num(m_plusesCount) + "/" + num(m_minusesCount); }
	inline bool isKnow(void) { return m_isKnow; }
	inline void setKnow(bool know) { m_isKnow = know; }
	inline unsigned plus(void) { return ++m_plusesCount; }
	inline unsigned minus(void) { return ++m_minusesCount; }
	inline unsigned plusesCount(void) { return m_plusesCount; }
	inline unsigned minusesCount(void) { return m_minusesCount; }
private:
	bool m_isKnow;
	QString m_word;
	QString m_translate;
	QString m_transcription;
	unsigned m_plusesCount;
	unsigned m_minusesCount;
};

#endif // WORDITEM_H
